package com.hrms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hrms.domain.User;
import com.hrms.service.UserService;
import com.hrms.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
* @author 15770
* @description 针对表【t_user(用户表)】的数据库操作Service实现
* @createDate 2024-12-17 21:52:51
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public Map login(User user) {
        Map map = new HashMap();
        User user1= userMapper.login(user);
        if(user1==null){
            map.put("result","error");
        }else {
            map.put("result","success");
            map.put("data",user1);
        }
        return map ;
    }
}




